package com.csweimei.rentmanagementtreasure.http.entity;

import com.csweimei.rentmanagementtreasure.utils.ValidateUtils;
import com.google.gson.annotations.SerializedName;

import java.io.Serializable;

public class HouseInfoDetailBean extends BaseResult implements Serializable {
    @SerializedName("data")
    private DataDTO data;

    public DataDTO getData() {
        return data;
    }

    public void setData(DataDTO data) {
        this.data = data;
    }

    public static class DataDTO  implements Serializable{
        @SerializedName("id")
        private int id;
        @SerializedName("userid")
        private int userid;
        @SerializedName("city")
        private String city;
        @SerializedName("category")
        private String category;
        @SerializedName("quarters")
        private String quarters;
        @SerializedName("roomname")
        private String roomname;
        @SerializedName("houserType")
        private String houserType;
        @SerializedName("Payment")
        private String payment;
        @SerializedName("rent")
        private String rent;
        @SerializedName("Address")
        private String address;
        @SerializedName("totalArea")
        private String totalArea;
        @SerializedName("imgsrc")
        private String imgsrc;
        @SerializedName("floor")
        private String floor;
        @SerializedName("lift")
        private String lift;
        @SerializedName("renovation")
        private String renovation;
        @SerializedName("toward")
        private String toward;
        @SerializedName("facilities")
        private String facilities;
        @SerializedName("describe")
        private String describe;
        @SerializedName("roomfeatures")
        private String roomfeatures;
        @SerializedName("housingTitle")
        private String housingTitle;
        @SerializedName("illustrate")
        private String illustrate;
        @SerializedName("status")
        private int status;
        @SerializedName("addtime")
        private String addtime;
        @SerializedName("longitude")
        private String longitude;
        @SerializedName("latitude")
        private String latitude;


        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getUserid() {
            return userid;
        }

        public void setUserid(int userid) {
            this.userid = userid;
        }

        public String getCity() {
            return city;
        }

        public void setCity(String city) {
            this.city = city;
        }

        public String getCategory() {
            return category;
        }

        public void setCategory(String category) {
            this.category = category;
        }

        public String getQuarters() {
            return quarters;
        }

        public void setQuarters(String quarters) {
            this.quarters = quarters;
        }

        public String getRoomname() {
            return roomname;
        }

        public void setRoomname(String roomname) {
            this.roomname = roomname;
        }

        public String getHouserType() {
            return houserType;
        }

        public void setHouserType(String houserType) {
            this.houserType = houserType;
        }

        public String getPayment() {
            return payment;
        }

        public void setPayment(String payment) {
            this.payment = payment;
        }

        public String getRent() {
            if (ValidateUtils.isNotEmptyString(rent)){
                return rent+"元/月";

            }else {
                return "面议";
            }
        }

        public void setRent(String rent) {
            this.rent = rent;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public String getTotalArea() {
            return totalArea;
        }

        public void setTotalArea(String totalArea) {
            this.totalArea = totalArea;
        }

        public String getImgsrc() {
            if (imgsrc.contains(",")){
                String[] strings = imgsrc.split(",");
                return strings[0];
            }else {
                return imgsrc;
            }
        }

        public void setImgsrc(String imgsrc) {
            this.imgsrc = imgsrc;
        }

        public String getFloor() {
            return floor;
        }

        public void setFloor(String floor) {
            this.floor = floor;
        }

        public String getLift() {
            return lift;
        }

        public void setLift(String lift) {
            this.lift = lift;
        }

        public String getRenovation() {
            return renovation;
        }

        public void setRenovation(String renovation) {
            this.renovation = renovation;
        }

        public String getToward() {
            return toward;
        }

        public void setToward(String toward) {
            this.toward = toward;
        }

        public String getFacilities() {
            return facilities;
        }

        public void setFacilities(String facilities) {
            this.facilities = facilities;
        }

        public String getDescribe() {
            return describe;
        }

        public void setDescribe(String describe) {
            this.describe = describe;
        }

        public String getRoomfeatures() {
            return roomfeatures;
        }

        public void setRoomfeatures(String roomfeatures) {
            this.roomfeatures = roomfeatures;
        }

        public String getHousingTitle() {
            return housingTitle;
        }

        public void setHousingTitle(String housingTitle) {
            this.housingTitle = housingTitle;
        }

        public String getIllustrate() {
            return illustrate;
        }

        public void setIllustrate(String illustrate) {
            this.illustrate = illustrate;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public String getAddtime() {
            return addtime;
        }

        public void setAddtime(String addtime) {
            this.addtime = addtime;
        }

        public String getLongitude() {
            return longitude;
        }

        public void setLongitude(String longitude) {
            this.longitude = longitude;
        }

        public String getLatitude() {
            return latitude;
        }

        public void setLatitude(String latitude) {
            this.latitude = latitude;
        }

        public String getDesc(){
            return quarters+" "+totalArea+"㎡ "+address;
        }
    }
}
